package Day12;

import java.util.Scanner;
// 1:无需package
// 2: 类名必须Main, 不可修改
/**
 * 2021Java真题:完全平方数
 * https://www.lanqiao.cn/problems/2374/learning/
 */
public class Main2 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        long n = scan.nextLong();
        for(long i = 2l; i * i <= n; i++){
          while(n % (i * i) == 0){
            n /= i * i;
          }
        }
        System.out.println(n);
        scan.close();
    }
}